using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CoreData;
using Services;
using Helper;
namespace ActionServices
{

    public interface IVoucherActionService:BaseActionService
    {
        long Save(object _model, ref string mess);
        IList<CoreData.Voucher> GetListByLINQ(Func<CoreData.Voucher, Boolean> _where);
        CoreData.Voucher GetOneByLINQ(Func<CoreData.Voucher, Boolean> _where);
        bool Delete(object _model);
        string GenerateReceiptNo(DateTime createdate);//thu hoc phi
        string GenerateReceiptNoApartment(DateTime createdate);//code thu can ho
        string GenerateReceiptNoLocal(DateTime createdate);//code thu noi bo
        string GenerateReceiptNoSalon(DateTime createdate);//code thu salon
        string GenerateReceiptNoSale(DateTime createdate);//code thu ban hang
        string GeneratePaymentNoApartment(DateTime createdate);//code chi can ho
        string GeneratePaymentNoSchool(DateTime createdate);//code chi truong
        IList<VwCashBook> GetListCashBook(string SearchString);
        IList<VwCashBook> GetListCashBook();
    }

    public partial class VoucherActionService:IVoucherActionService
    {
       VoucherService Service;

       public VoucherActionService()
       {
           Service = new VoucherService();
       }

       #region Main Method

       public virtual long Save(object _model, ref string mess)
       {
           return Service.Save(_model,ref mess);
       }

       public virtual object GetByID(long _id)
       {
           return Service.GetByID(_id);
       }

       public virtual object GetList()
       {
           return Service.GetList();
       }

       public virtual IList<CoreData.Voucher> GetListByLINQ(Func<CoreData.Voucher, Boolean> _where)
       {
           return Service.GetListByLINQ(_where);
       }

       public virtual CoreData.Voucher GetOneByLINQ(Func<CoreData.Voucher, Boolean> _where)
       {
           return Service.GetOneByLINQ(_where);
       }

       public virtual object GetList(string _searchstring)
       {
           return Service.GetList(_searchstring);
       }

       public virtual bool Delete(object _model)
       {
           return Service.Delete(_model);
       }

       #endregion


        #region Other Method

       public virtual string GenerateReceiptNo(DateTime createdate)
       {
           return Service.GenerateReceiptNo( createdate);
        }
       public virtual string GenerateReceiptNoApartment(DateTime createdate)
        {
            return Service.GenerateReceiptNoApartment( createdate);
        }

       public virtual string GenerateReceiptNoLocal(DateTime createdate)
        {
            return Service.GenerateReceiptNoLocal( createdate);
        }

       public virtual string GenerateReceiptNoSalon(DateTime createdate)
        {
            return Service.GenerateReceiptNoSalon( createdate);
        }
       public virtual string GeneratePaymentNoApartment(DateTime createdate)
        {
            return Service.GeneratePaymentNoApartment( createdate);
        }

       public virtual string GeneratePaymentNoSchool(DateTime createdate)
        {
            return Service.GeneratePaymentNoSchool( createdate);
        }

       public virtual string GenerateReceiptNoSale(DateTime createdate)
        {
            return Service.GenerateReceiptNoSales( createdate);
        }

        #endregion

        #region Report

        public virtual IList<VwCashBook> GetListCashBook(string SearchString)
        {
            return Service.GetListCashBook(SearchString);
        }
        public virtual IList<VwCashBook> GetListCashBook()
        {
            return Service.GetListCashBook();
        }

        #endregion

    }
         
}
